package com.ry.est.service.impl;

import com.ry.est.constants.Constants;
import com.ry.est.dao.MaintainOrderFlowDao;
import com.ry.est.entity.MaintainOrderFlow;
import com.ry.est.service.MaintainOrderFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author ry
 * @since 2021-11-10 09:32
 **/
@Service
public class MaintainOrderFlowServiceImpl implements MaintainOrderFlowService {
    @Autowired
    private MaintainOrderFlowDao maintainOrderFlowDao;

    @Override
    public int saveMaintainOrderFlow(MaintainOrderFlow maintainOrderFlow) {
        maintainOrderFlow.setCreatedTime(new Date());
        maintainOrderFlow.setIsDelete(Constants.EST_NOT);

        return maintainOrderFlowDao.insert(maintainOrderFlow);
    }
}
